package biz.obake.team.touchprotector;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import biz.obake.team.touchprotector.g.c;
import biz.obake.team.touchprotector.tpservice.TPService;

public class StaticReceiver extends BroadcastReceiver {

    /* renamed from: a  reason: collision with root package name */
    private Handler f1547a = new Handler();

    class a implements Runnable {
        a(StaticReceiver staticReceiver) {
        }

        public void run() {
            TPService.k("Lock", "Notification");
        }
    }

    public void onReceive(Context context, Intent intent) {
        boolean z;
        String str;
        String action = intent.getAction();
        if ("android.intent.action.BOOT_COMPLETED".equals(action)) {
            if (biz.obake.team.touchprotector.g.a.g("auto_start") && "Stopped".equals(c.c("TPService.State"))) {
                str = "Boot";
            } else {
                return;
            }
        } else if ("android.intent.action.MY_PACKAGE_REPLACED".equals(action)) {
            if (biz.obake.team.touchprotector.g.a.g("auto_start") && "Stopped".equals(c.c("TPService.State"))) {
                str = "AppUpdated";
            } else {
                return;
            }
        } else if ("biz.obake.team.touchprotector.notification".equals(action)) {
            this.f1547a.postDelayed(new a(this), (long) biz.obake.team.touchprotector.g.a.j("notif_lock_delay"));
            return;
        } else if ("biz.obake.team.touchprotector.quit".equals(action)) {
            TPService.k("Stop", "Notification");
            return;
        } else {
            if ("biz.obake.team.touchprotector.pause_sensor".equals(action)) {
                biz.obake.team.touchprotector.log.a.b().d("Notification: Sensors Off");
                z = true;
            } else if ("biz.obake.team.touchprotector.resume_sensor".equals(action)) {
                biz.obake.team.touchprotector.log.a.b().d("Notification: Sensors On");
                z = false;
            } else {
                return;
            }
            c.f("Sensors.Paused", z);
            return;
        }
        TPService.n(str);
    }
}
